package com.easy.service.impl;

import com.easy.bean.Bed;
import com.easy.bean.Doctor;
import com.easy.dao.IDoctorDao;
import com.easy.service.IDoctorService;
import com.easy.util.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DoctorService implements IDoctorService {
    @Autowired
    IDoctorDao dao;

    @Override
    public List<Doctor> getDoctor(Doctor doctor, Page page) {
        return dao.getDoctor(doctor,page);
    }

    @Override
    public List<Doctor> getDoctorByDep_id(Doctor doctor) {
        return dao.getDoctorByDep_id(doctor);
    }

    @Override
    public int addDoctor(Doctor doctor) {
        return dao.addDoctor(doctor);
    }

    @Override
    public int editDoctor(Doctor doctor) {
        int count= dao.editDoctor(doctor);
        return count ;
    }

    @Override
    public Doctor getDoctorById(int id) {
        return dao.getDoctorById(id);
    }

    @Override
    public int delDoctor(int id) {
        return 0;
    }

    @Override
    public int getCount(Doctor doctor) {
        return dao.getCount(doctor);
    }

    @Override
    public List<String > getDoctorName() {
        return dao.getDoctorName();
    }
}
